<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:pt="http://xmlns.jcp.org/jsf/passthrough"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">
    <h:head>
        <title>iNET- Tiện ích văn phòng</title>
        <meta charset="UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/>
        <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
        <!--        <link rel="shortcut icon" href="TienIchVanPhong/resources/images/logo.png" />
                <h:outputStylesheet library="css" name="menu.css"/>
        -->                <h:outputStylesheet library="css" name="style.css"/><!--
                        <h:outputStylesheet library="css" name="BeatPicker.min.css"/>
                        <h:outputScript library="js" name="jquery-1.11.0.min.js"/>
                        <h:outputScript library="js" name="BeatPicker.min.js"/>-->

    </h:head>
    <h:body>
        <h:form id="demo">
            <table class="bordered" align="center">
                <tr>
                    <th>ID</th>
                    <th>Họ Tên Nhân Viên</th>
                    <c:forEach var="o" end="${constantsController.countDateOfMonth()-1}" items="${constantsController.month}"  >
                        <th>${o}</th>
                    </c:forEach>
                    <th></th>
                </tr>
                <c:forEach begin="0" end="5" items="#{reportTimeKeepingController.list}" var="c">
                    <tr>
                        <td><h:outputLabel value="#{c.employee.emp_id}"></h:outputLabel></td>
                        <td><h:outputLabel value="#{c.employee.first_name} "></h:outputLabel>
                            <h:outputLabel value="#{c.employee.last_name}"></h:outputLabel>
                        </td>
                        <c:forEach var="o" items="${c.listTimeKeepingDetail}"  >
                            <td></td>
                        </c:forEach>
                        <c:forEach var="o" begin="0"  end="${tKDController.countDay()-1}" >
                            <td></td>
                        </c:forEach>
                        <td><h:commandLink rendered="#{userController.userActive.isManager}" value="Sửa"></h:commandLink></td>
                    </tr>
                </c:forEach>
                <h:dataTable class="bordered" value="#{reportTimeKeepingController.list}" var="b" >
                    <h:column>
                        <f:facet name="header">
                            ID
                        </f:facet>
                        <h:outputLabel value="#{b.employee.emp_id}" ></h:outputLabel>
                    </h:column>

                    <h:column>
                        <f:facet name="header">
                            Tên
                        </f:facet>
                        <h:outputLabel value="#{b.employee.first_name} " ></h:outputLabel>
                        <h:outputLabel value="#{b.employee.last_name} " ></h:outputLabel>                        
                    </h:column>
                    <h:column>
                        <f:facet name="header">
                            <c:forEach var="o" end="${constantsController.countDateOfMonth()-1}" items="${constantsController.month}"  >
                            <th >${o}</th>
                        </c:forEach>
                        </f:facet>
                        <c:forEach var="o" end="${constantsController.countDateOfMonth()-1}" items="${constantsController.month}"  >
                            <td >
                                <h:outputText value="${o}" rendered="false"></h:outputText>
                                <h:inputText style="width: 5px; border: none" value="${o}" rendered="true"></h:inputText>
                            </td>
                        </c:forEach>
                        <h:outputLabel value="#{b.listTimeKeepingDetail} " ></h:outputLabel>

                    </h:column>
                </h:dataTable>
            </table>
        </h:form>
    </h:body>
</html>

